// 函数组合调试
// NEVER SAY DIE --> never-say-die

const _ = require('lodash')
const { reduce } = require('lodash')

const split = _.curry((sep, str) => _.split(str, sep))

const join = _.curry((sep, arr) => _.join(arr, sep))

const log = _.curry((log, v) => {
    console.log(log, v)
    return v
})

const fn = _.flowRight(join('-') ,split(' ') , log('小写之后'), _.toLower)

console.log(fn('NEVER SAY DIE'))
